local rolely_hengshuo = fk.CreateSkill {
    name = "rolely_hengshuo",

}
Fk:loadTranslationTable {
    ["rolely_hengshuo"] = "横槊",
    [":rolely_hengshuo"] = "摸牌阶段结束时，你可以弃置体力值等量的牌，对所有其他角色造成一点伤害。",

}
rolely_hengshuo:addEffect(fk.EventPhaseEnd, {
    anim_type = "offensive",
    can_trigger = function(self, event, target, player, data)
        return target == player and player:hasSkill(self) and player.phase == Player.Draw and
            player:getHandcardNum() >= player.hp
    end,
    on_cost = function(self, event, target, player, data)
        local room = player.room
        local card = room:askToDiscard(player, {
            min_num = player.hp,
            max_num = player.hp,
            cancelable = true,
            include_equip = false,
            skill_name = rolely_hengshuo.name,
            prompt = "横槊：请选择弃置" .. player.hp .. "张牌，对其他所有角色造成一点伤害",
            skip = true,
        })
        if #card > 0 then
            event:setCostData(self, { cards = card })
            return true
        end
    end,
    on_use = function(self, event, target, player, data)
        local room = player.room
        room:throwCard(event:getCostData(self).cards, rolely_hengshuo.name, player, player)
        for _, id in ipairs(room:getOtherPlayers(player)) do
            room:damage({
                from = player,
                to = id,
                damage = 1,
                damageType = fk.NormalDamage,
                skillName = rolely_hengshuo.name
            })
        end
    end,
})

return rolely_hengshuo
